<template>
  <el-button type="primary" style="margin-left: 16px" @click="btnClick">
    open
  </el-button>

  <el-drawer
    v-model="drawer"
    :lock-scroll="true"
    title="I am the title"
    :with-header="false"
  >
    <span>Hi there!</span>
  </el-drawer>
</template>

<script lang="ts">
import { defineComponent, ref } from 'vue'

export default defineComponent({
  setup() {
    const drawer = ref(false)
    const btnClick = () => {
      drawer.value = true
      document.body.style.overflowY = 'hidden'
    }
    return {
      drawer,
      btnClick
    }
  }
})
</script>
